POV-Ray : Newsgroups : povray.general : But *how* to do the constant energy solution for particle physics? : Re: But *how* to do the constant energy solution for particle physics? Server Time
3 Aug 2024 12:14:27 EDT (-0400)
  Re: But *how* to do the constant energy solution for particle physics?  
From: Christopher James Huff
Date: 28 Feb 2004 23:59:43
Message: <cjameshuff-186E57.00003729022004@news.povray.org>
In article <4041693c$1@news.povray.org>,
 "Greg M. Johnson" <gregj;-)565### [at] aolcom> wrote:

> I think some of you were answering the question about the conservation of
> energy after collisions  based on an entire system of particles, or after a
> three-way collision.  Thanks, but that was not actually the problem of my
> interest.

Any 3-way interaction, actually. Even just gravitational interaction.


> By that I mean that as a travel any finite step obliquely across a gravity
> well,  there's a difference between real life and my model.  My model just
> re-computes new force at position 2,  whereas a real-life particle would
> have the gravity acting on it both "instantaneously" and "continuously".
> Someone noted way back then that I wasn't conserving energy. I think others
> with nice intentions pointed me to theories that were over my head, and I
> suspect, not applicable.

There is no way to compute an exact solution for 3 or more 
gravitationally interacting bodies. However, you can compute a very 
close approximation. I did a simulation (in C++) that was able to 
simulate the orbits of the planets from Mercury to Jupiter for several 
Jovian years (several dozen Earth years), with very little drift. (I 
simply haven't entered the data for the other planets)
There are some rather complex algorithms needed to do this with both 
accuracy and efficiency, however. And there will always be cumulative 
errors, the simulation will diverge from reality over time, there is no 
way around that.


> Jelby, in your second post,  you offer an interesting idea.
> >  p2 = p1 + v1*dt + 1/2*a1*(dt^2)
> But is fundamentally any different from going to a smaller time slice?  And

This basically assumes that acceleration will be constant over the time 
interval, and takes that into account for the new point. I take it you 
were originally using p2 = p1 + v1*dt?
This does give a more accurate result, but is still not exact. You can 
get even better results by doing this one step, then backing up and 
using the average of the acceleration at the original position and the 
first approximation of the new position to compute the real new 
position, thus taking into account the fact that the acceleration 
changes over the time step. This isn't as good as you can get either, 
but it's easy to compute.


> I was hoping for a solution where dt= one povray frame.

That is probably a bad idea. The accuracy of the simulation will then 
depend on the number of frames in the animation. You may get very 
different results when you do a longer render.


> So I'm falling back to three ideas:
> 1) it is in fact impossible

Exact solutions are impossible. "Close enough" solutions are quite 
possible.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: <chr### [at] tagpovrayorg>
http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.